package app.controller;

import app.dao.UserDao;
import app.entity.User;
import app.service.MyService;
import app.service.UserService;
import io.avaje.jsonb.Jsonb;
import io.jooby.annotation.GET;
import io.jooby.annotation.Path;
import io.jooby.annotation.Transactional;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import org.jdbi.v3.core.Handle;
import org.jdbi.v3.core.Jdbi;

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

@Singleton
@Path("/user")
public class UserController {

    @Inject
    UserService userService;


    @GET
    @Path("saveUserRole")
    @Transactional
    public String saveUserAndRole() {
        userService.saveUserAndRole();
        return "ok";
    }
}
